<script>
  $().ready(function() {
    $("form").validate({
      rules: {
        tgl_kegiatan: {
          required: true
        },
        kegiatan: {
          required: true,
        },
      },
      messages: {
        tgl_kegiatan: {
          required: "Tanggal kegiatan harus diisi."
        },
        kegiatan: {
          required: "Info kegiatan harus diisi.",
        },
      }
    });

    var topicInputs = topics.find("input").attr("disabled", !inital);
  });
</script>
<div id="page-wrapper">
  <div class="row">
    <div class="col-sm-10">
      <div class="panel panel-default">
        <div class="panel-heading"><span class="judul-page">Tambah Kegiatan</span></div>
        <div class="panel-body">
          <form class="form-horizontal" role="form" method="post" action="<?php echo site_url('kegiatan/proses_add')?>" enctype="multipart/form-data">
            <div class="form-group">
              <label class="col-sm-3 control-label">Tanggal Kegiatan</label>
              <div class="col-sm-3">
                <input type="text" name="tgl_kegiatan" id="tanggal" class="form-control input-sm">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">Info Kegiatan</label>
              <div class="col-sm-9">
                <textarea id="konten" name="kegiatan"></textarea>
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-offset-3 col-sm-9">
                <button type="submit" class="btn btn-primary btn-sm">Simpan</button>
                <button type="reset" class="btn btn-danger btn-sm">Reset</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
    <div class="col-sm-4"></div>
  </div>
</div>